package cn.fl.spl.service.impl;

import cn.cmm.base.framework.constant.BaseConstant;
import cn.cmm.base.framework.exception.BaseException;
import cn.fl.spl.service.ISplAppOpinionReactionService;
import fl.mongo.facade.base.page.PaginationVo;
import fl.mongo.facade.spl.api.ISplAppOpinionReactionApiService;
import fl.mongo.facade.spl.api.ISplAppOpinionReactionQueryApiService;
import fl.mongo.facade.spl.condition.SplAppOpinionReactionQC;
import fl.mongo.facade.spl.dto.SplAppOpinionReactionDTO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SplAppOpinionReactionServiceImpl implements ISplAppOpinionReactionService {
	
	@Autowired
	private ISplAppOpinionReactionApiService splAppOpinionReactionApiService;

	@Autowired
	private ISplAppOpinionReactionQueryApiService splAppOpinionReactionQueryApiService;


	@Override
	public PaginationVo querySplAppOpinionReactionListPage(PaginationVo paginationVo) throws BaseException {
		// TODO Auto-generated method stub
		return this.splAppOpinionReactionQueryApiService.findSplAppOpinReactDTOByPage(paginationVo);
	}

	@Override
	public boolean removeByIds(List<String> ids) throws BaseException {
		// TODO Auto-generated method stub
		SplAppOpinionReactionQC condition = new SplAppOpinionReactionQC();
		condition.setIds(ids);
		SplAppOpinionReactionDTO splAppOpinionReactionDTO = new SplAppOpinionReactionDTO();
		splAppOpinionReactionDTO.setIsDel(BaseConstant.IS_YESNO_YES);
		splAppOpinionReactionDTO.setIsValid(BaseConstant.IS_YESNO_NO);
		return this.splAppOpinionReactionApiService.updateSplAppOpinionReactionDTO(condition, splAppOpinionReactionDTO);
	}

}
